package cn.wokoba.trigger.tech.fallstrategy.Impl;

import cn.wokoba.trigger.tech.fallstrategy.FallbackStrategy;
import cn.wokoba.types.enums.ResponseCode;
import cn.wokoba.types.model.Response;
import org.aspectj.lang.ProceedingJoinPoint;

public class DefaultFallbackStrategy implements FallbackStrategy {
    @Override
    public Object handleFallback(ProceedingJoinPoint joinPoint) throws Throwable {
        return Response.<String>builder()
                .code(ResponseCode.UN_ERROR.getCode())
                .info(ResponseCode.UN_ERROR.getInfo())
                .data("频次限制，请勿恶意访问！")
                .build();
    }
}
